package org.framework.lazy.cloud.network.heartbeat.protocol.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 服务端模式配置
 */
@Configuration
@ConfigurationProperties(prefix = ProtocolProxyProperties.prefix)
@Data
public class ProtocolProxyProperties {
    public static final String prefix = "spring.lazy.netty.protocol.proxy";

    /**
     * 是否验证权限账号
     */
    private Boolean authentication=false;

    /**
     * http协议代理
     */
    private HttpProtocolProxy httpProtocolProxy = new HttpProtocolProxy();
    /**
     * tcp协议代理
     */
    private SocketProtocolProxy socketProtocolProxy = new SocketProtocolProxy();


    @Data
    public static class HttpProtocolProxy {
        private Integer port = 8001;
    }

    @Data
    public static class SocketProtocolProxy {
        private Integer port = 9001;
    }

}
